<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Модерация вопросов</title>
</head>
<body>
<h1>Модерация вопросов</h1>
{% for item in object_list %}
{% if item.is_validated == False %}
<div>
    <h2>{{ item.category.name }}</h2>
    <h3>{{ item.created_at }}</h3>
    <p>{{ item.question }}</p>
    <p>{{ item.answer }}</p>
    <a href="{% url 'quest:update_quest' pk=item.pk %}">Одобрить</a>
    <a href="{% url 'quest:delete_quest' pk=item.pk %}">Не одобрять</a>
    <form method="post" enctype="multipart/form-data">
        {% csrf_token %}
            <input type="hidden" name="question_id" value='{{ item.pk }}'>
        <p>
            <input type="text" name="complaint" autocapitalize="none"
                   maxlength="150" class="textinput textInput form-control"
                   required="" placeholder="Замечание">
        </p>
        <p>
            <button type="submit" class="btn btn-primary btn-block">
                Добавить
            </button>
        </p>
    </form>
</div>
{% endif %}
{% endfor %}
</body>
</html>